#ifndef _UI_FLEXEFFECT_H_
#define _UI_FLEXEFFECT_H_

#include "ui_widget.h"
#include "ui_trsprite.h"



namespace ui
{
class UIFlexEffect : public UIWidget
{
public:

	typedef bool (*FLEXEFFECT_TICKFUNCTION)(float);
	typedef bool (*FLEXEFFECT_RENDERFUNCTION)(bool);

/// stuff that every self-respecting widget should have
						UIFlexEffect(UIWidget* pParent,const std::string& Name = "");
	virtual				~UIFlexEffect();
	virtual bool		Create(const std::string& Name, const math::Vec2& Pos = math::Vec2(0.5f, 0.5f), const math::Vec2& Size= math::Vec2(0.1f, 0.1f));
	virtual	bool		Load(LuaPlus::LuaObject& _LObj);
	/// update
	virtual	bool		Tick(float dt);
	/// display
	virtual bool		Render(bool Force = false);
	/// register with LUA Bind
	static	void		Register(LuaPlus::LuaState* _pScript);

	//FLEXEFFECT-SPECIFIC STUFF

	//METHODS
	void				SetTickFunc(FLEXEFFECT_TICKFUNCTION pTickFunc){m_pTickFunc = pTickFunc;};
	void				SetRenderFunc(FLEXEFFECT_RENDERFUNCTION pRenderFunc){m_pRenderFunc = pRenderFunc;};

	//MEMBERS



protected:

	//METHODS

	//MEMBERS

	//callback functions for tick and render
	FLEXEFFECT_TICKFUNCTION				m_pTickFunc;
	FLEXEFFECT_RENDERFUNCTION			m_pRenderFunc;

};//class UIFlexEffect : public UIWidget
};//namespace ui


#endif